package com.lam.mall.entity;

import java.util.Date;

import javax.validation.constraints.Null;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.lam.common.base.domain.BaseEntity;
import com.lam.common.components.dict.annotation.Dict;
import com.lam.common.utils.DateUtil;
import com.lam.common.validate.annotation.DictCheck;
import com.lam.common.validate.annotation.DictValid;
import com.lam.common.validate.group.Add;

/**
 * 订单日志对象 mall_order_log
 * 
 * @author admin
 * @date 2023-04-26
 */
@DictCheck
@TableName("mall_order_log")
public class OrderLog implements BaseEntity{

    /** 主键 */
    @Null(groups = Add.class, message="id必须为空")
    @TableId(type = IdType.ASSIGN_ID)
    private String id;
    
    /** 订购流水号 */
    private String orderNumber;

    /** 操作人类型(1-买家, 2-卖家, 3-系统, 4-管理员) */
    @DictValid(message = "无效的操作人类型")
    @Dict(dictCode = "order_oper_type")
    private Integer operType;

    /** 操作备注 */
    private String operRemark;

    /** 操作时间 */
    @JsonFormat(pattern = DateUtil.PATTERN_DEFAULT)
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /** 操作人 */
    private String createBy;
    
    @TableField(exist = false)
    private String opType;

    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    } 

    public void setOrderNumber(String orderNumber) {
        this.orderNumber = orderNumber;
    }

    public String getOrderNumber() {
        return orderNumber;
    }    
    
    public void setOperType(Integer operType) {
        this.operType = operType;
    }

    public Integer getOperType() {
        return operType;
    }    
    
    public void setOperRemark(String operRemark) {
        this.operRemark = operRemark;
    }

    public String getOperRemark() {
        return operRemark;
    }    
    
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getCreateTime() {
        return createTime;
    }    
    
    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public String getCreateBy() {
        return createBy;
    }

	public String getOpType() {
		return opType;
	}

	public void setOpType(String opType) {
		this.opType = opType;
	}    
    

}
